a=int(input())
x=int(input())
if a>x:
    for i in range(x,a+1):
        if i%7==0:
            print(i)
else:
    for i in range(a,x+1):
        if i%7==0:
            print(i)